A Model-Based Approach to Test Generation for Aspect-Oriented Programs
نویسندگان
چکیده
This paper presents an approach to generating tests for adequately exercising interaction between aspects and classes based on aspect-oriented UML models. In this approach, an aspect-oriented model consists of class diagrams, aspect diagrams, and sequence diagrams. Since methods of classes and advices of aspects are both specified by sequence diagrams, the advices on a given method can be weaved into a new sequence diagram, which is essential to the weaving mechanism in AOSD. For a woven sequence diagram, the approach exploits goal-directed reasoning to construct a flow graph for a given coverage criteria (e.g. the combination of branch coverage and polymorphic coverage in this paper), and further expands the graph to a flow tree, where each path is a test. Then the approach derives objects with desired states for exercising each test in the flow tree.
منابع مشابه
Automated Evolutionary Test Data Generation with Domain Reduction for Aspect-Oriented Programs
Aspect-Oriented Programming is an emerging technique that helps improve separation of concerns in software systems. It has received a great deal of recent interest. However, algorithms and empirical results for testing of aspect-oriented programs are lagging some way behind this upsurge in interest. To date, there are few published approaches to automated test data generation for aspectoriented...
متن کاملAutomated State-Based Unit Testing for Aspect-Oriented Programs: A Supporting Framework
Interactions between aspects and classes are a new source for faults. Existing objectoriented testing techniques are not adequate for testing aspect-oriented programs. As a consequence, new testing techniques must be developed. We present, in this paper, a state-based unit testing technique for aspect-oriented programs and associated tool (AJUnit). The technique focuses on the integration of on...
متن کاملA State-Based Approach to Testing Aspect-Oriented Programs
This paper presents a state-based approach to testing aspect-oriented programs. Aspectual state models, as an extension to the testable FREE state model of classes, are exploited to capture the impact of aspects on the state models of classes. To generate test suites for adequately testing object behavior and interaction between classes and aspects in terms of message sequences, we transform an...
متن کاملA State-Based Testing Approach for Aspect-Oriented Programming
the state-based behavior of AOP program with the consideration of the interactions between the base modules and aspects. Based on the model, test cases can be derived so as to uncover the potential state behavior errors in the AOP programs. In addition, an example is provided to show the effectiveness of the proposed approach.
متن کاملTesting Aspect-Oriented Programs with UML Design Models
The new constructs in aspect-oriented programming bring new types of programming faults with respect to crosscutting concerns, such as incorrect pointcuts and advice. This paper presents a UML-based approach to testing whether or not an aspect-oriented program conforms to its expected crosscutting behavior. We explore aspect-oriented UML design models to derive tests for exercising interactions...
متن کامل